import express from 'express'

const app = express()

app.set('view engine', 'ejs')

app.use(express.static(`${__dirname}/public`))

app.get('/', (req, res) => {
  // string response
  // res.send('<html><body><p>Hello World!</p></body></html>')
  res.render('index', {
    message: 'hello world',
  })
})

app.listen(3000, () => {
  console.log('Express app listening on port 3000')
})